package cn.xiaopengstack.infrastructure.dao.po;

import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * MCP客户端配置表
 * @TableName ai_client_tool_mcp
 */
@Data
public class AiClientToolMcp implements Serializable {
    /**
     * 主键ID
     */
    private Long id;

    /**
     * MCP id
     */
    private String mcpId;

    /**
     * MCP名称
     */
    private String mcpName;

    /**
     * 传输类型(sse/stdio)
     */
    private String transportType;

    /**
     * 传输配置(sse/stdio)
     */
    private String transportConfig;

    /**
     * 请求超时时间(分钟)
     */
    private Integer requestTimeout;

    /**
     * 状态(0:禁用,1:启用)
     */
    private Integer status;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 更新时间
     */
    private Date updateTime;

    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        AiClientToolMcp other = (AiClientToolMcp) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getMcpId() == null ? other.getMcpId() == null : this.getMcpId().equals(other.getMcpId()))
            && (this.getMcpName() == null ? other.getMcpName() == null : this.getMcpName().equals(other.getMcpName()))
            && (this.getTransportType() == null ? other.getTransportType() == null : this.getTransportType().equals(other.getTransportType()))
            && (this.getTransportConfig() == null ? other.getTransportConfig() == null : this.getTransportConfig().equals(other.getTransportConfig()))
            && (this.getRequestTimeout() == null ? other.getRequestTimeout() == null : this.getRequestTimeout().equals(other.getRequestTimeout()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getMcpId() == null) ? 0 : getMcpId().hashCode());
        result = prime * result + ((getMcpName() == null) ? 0 : getMcpName().hashCode());
        result = prime * result + ((getTransportType() == null) ? 0 : getTransportType().hashCode());
        result = prime * result + ((getTransportConfig() == null) ? 0 : getTransportConfig().hashCode());
        result = prime * result + ((getRequestTimeout() == null) ? 0 : getRequestTimeout().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", mcpId=").append(mcpId);
        sb.append(", mcpName=").append(mcpName);
        sb.append(", transportType=").append(transportType);
        sb.append(", transportConfig=").append(transportConfig);
        sb.append(", requestTimeout=").append(requestTimeout);
        sb.append(", status=").append(status);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}